package com.yungu.swift.order.model.vo;

import com.yungu.swift.assets.driver.model.dto.DriverCommissionConfigDto;
import com.yungu.swift.assets.driver.model.vo.DriverVo;
import com.yungu.swift.assets.passenger.model.dto.PassengerRechargeDto;
import com.yungu.swift.assets.passenger.model.vo.PassengerVo;
import com.yungu.swift.base.model.BaseVo;
import com.yungu.swift.order.model.dto.OrderDto;
import com.yungu.swift.order.model.dto.OrderFareDto;
import com.yungu.swift.system.sys.model.vo.SysDriverAccountVo;
import com.yungu.swift.system.sys.model.vo.SysPassengerAccountVo;
import com.yungu.swift.utils.JsonUtils;

import java.math.BigDecimal;

/**
 * @author Zerrion
 * @date 2017/5/8
 */
public class PayVo extends BaseVo {
    /**
     * 系统业务参数，包括：
     * 支付目的 payPurpose
     * 支付端 paySide
     * 支付类型 payType
     * 用户uuid userUuid
     * 订单uuid orderUuid
     * 乘客优惠券uuid  passengerCouponUuid
     * 乘客优惠券uuid rechargeUuid
     * 微信支付IP spbillCreateIp
     * 订单实体 orderDto
     * 订单费用实体 orderFareDto
     * 司机实体 driverDto
     * 乘客实体 passengerVo
     * 系统配置实体 sysConfigDto
     * 充值面额实体 passengerRechargeDto
     * 微信openid openid
     * 充值订单uuid orderRechargeUuid
     * 预支付业务uuid financePrepayUuid
     * 乘客账号实体 accountPassengerBean
     * 司机账号实体 accountDriverBean
     */
    private Integer payPurpose;
    private Integer paySide;
    private Integer payType;
    private String userUuid;
    private String orderUuid;
    private String passengerCouponUuid;
    private String rechargeUuid;
    private String spbillCreateIp;
    private OrderDto orderDto;
    private OrderFareDto orderFareDto;
    private DriverVo driverVo;
    private PassengerVo passengerVo;
    private PassengerRechargeDto passengerRechargeDto;
    private String openid;
    private String orderRechargeUuid;
    private String financePrepayUuid;
    private SysPassengerAccountVo accountPassengerBean;
    private SysDriverAccountVo accountDriverBean;
    private DriverCommissionConfigDto driverCommissionConfigDto;
    /**
     * 生成参数,包括：
     * 订单流水号 tradeNo
     * 订单标题 subject
     * 订单描述 description
     * 实付金额 actualFare
     * 实际抵扣金额 actualDeductible
     * 抽成完乘客余额 passengerBalance
     * 支付后司机余额 driverBalanceAfterPay
     * 抽成完司机余额 driverBalance
     * 抽成完订单余额 orderBalance
     * 是否回调 callback
     */
    private String tradeNo;
    private String subject;
    private String description;
    private BigDecimal actualFare;
    private BigDecimal actualDeductible;
    private BigDecimal passengerBalance;
    private BigDecimal driverBalanceAfterPay;
    private BigDecimal driverBalance;
    private BigDecimal orderBalance;
    private Boolean callback = false;


    /**
     * 无参构造函数，用于json序列化
     */
    public PayVo() {
    }

    public PayVo(Integer payPurpose, Integer paySide, Integer payType, String userUuid, String orderUuid, String passengerCouponUuid, String rechargeUuid, String appid, String spbillCreateIp, String openid) {
        super.setAppid(appid);
        this.payPurpose = payPurpose;
        this.paySide = paySide;
        this.payType = payType;
        this.userUuid = userUuid;
        this.orderUuid = orderUuid;
        this.passengerCouponUuid = passengerCouponUuid;
        this.rechargeUuid = rechargeUuid;
        this.spbillCreateIp = spbillCreateIp;
        this.openid = openid;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public Integer getPayPurpose() {
        return payPurpose;
    }

    public void setPayPurpose(Integer payPurpose) {
        this.payPurpose = payPurpose;
    }

    public Integer getPaySide() {
        return paySide;
    }

    public void setPaySide(Integer paySide) {
        this.paySide = paySide;
    }

    public Integer getPayType() {
        return payType;
    }

    public void setPayType(Integer payType) {
        this.payType = payType;
    }

    public String getUserUuid() {
        return userUuid;
    }

    public void setUserUuid(String userUuid) {
        this.userUuid = userUuid;
    }

    public String getOrderUuid() {
        return orderUuid;
    }

    public void setOrderUuid(String orderUuid) {
        this.orderUuid = orderUuid;
    }

    public String getPassengerCouponUuid() {
        return passengerCouponUuid;
    }

    public void setPassengerCouponUuid(String passengerCouponUuid) {
        this.passengerCouponUuid = passengerCouponUuid;
    }

    public String getRechargeUuid() {
        return rechargeUuid;
    }

    public void setRechargeUuid(String rechargeUuid) {
        this.rechargeUuid = rechargeUuid;
    }

    public String getSpbillCreateIp() {
        return spbillCreateIp;
    }

    public void setSpbillCreateIp(String spbillCreateIp) {
        this.spbillCreateIp = spbillCreateIp;
    }

    public OrderDto getOrderDto() {
        return orderDto;
    }

    public void setOrderDto(OrderDto orderDto) {
        this.orderDto = orderDto;
    }

    public OrderFareDto getOrderFareDto() {
        return orderFareDto;
    }

    public void setOrderFareDto(OrderFareDto orderFareDto) {
        this.orderFareDto = orderFareDto;
    }

    public DriverVo getDriverVo() {
        return driverVo;
    }

    public void setDriverVo(DriverVo driverVo) {
        this.driverVo = driverVo;
    }

    public PassengerVo getPassengerVo() {
        return passengerVo;
    }

    public void setPassengerVo(PassengerVo passengerVo) {
        this.passengerVo = passengerVo;
    }

    public PassengerRechargeDto getPassengerRechargeDto() {
        return passengerRechargeDto;
    }

    public void setPassengerRechargeDto(PassengerRechargeDto passengerRechargeDto) {
        this.passengerRechargeDto = passengerRechargeDto;
    }

    public String getTradeNo() {
        return tradeNo;
    }

    public void setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public BigDecimal getActualFare() {
        return actualFare;
    }

    public void setActualFare(BigDecimal actualFare) {
        this.actualFare = actualFare;
    }

    public BigDecimal getActualDeductible() {
        return actualDeductible;
    }

    public void setActualDeductible(BigDecimal actualDeductible) {
        this.actualDeductible = actualDeductible;
    }

    public BigDecimal getPassengerBalance() {
        return passengerBalance;
    }

    public void setPassengerBalance(BigDecimal passengerBalance) {
        this.passengerBalance = passengerBalance;
    }

    public BigDecimal getDriverBalanceAfterPay() {
        return driverBalanceAfterPay;
    }

    public void setDriverBalanceAfterPay(BigDecimal driverBalanceAfterPay) {
        this.driverBalanceAfterPay = driverBalanceAfterPay;
    }

    public BigDecimal getDriverBalance() {
        return driverBalance;
    }

    public void setDriverBalance(BigDecimal driverBalance) {
        this.driverBalance = driverBalance;
    }

    public BigDecimal getOrderBalance() {
        return orderBalance;
    }

    public void setOrderBalance(BigDecimal orderBalance) {
        this.orderBalance = orderBalance;
    }

    public Boolean getCallback() {
        return callback;
    }

    public void setCallback(Boolean callback) {
        this.callback = callback;
    }

    @Override
    public String toString() {
        return JsonUtils.toJSONString(this);
    }

    public SysPassengerAccountVo getAccountPassengerBean() {
        return accountPassengerBean;
    }

    public void setAccountPassengerBean(SysPassengerAccountVo accountPassengerBean) {
        this.accountPassengerBean = accountPassengerBean;
    }

    public SysDriverAccountVo getAccountDriverBean() {
        return accountDriverBean;
    }

    public void setAccountDriverBean(SysDriverAccountVo accountDriverBean) {
        this.accountDriverBean = accountDriverBean;
    }

    public String getOrderRechargeUuid() {
        return orderRechargeUuid;
    }

    public void setOrderRechargeUuid(String orderRechargeUuid) {
        this.orderRechargeUuid = orderRechargeUuid;
    }

    public String getFinancePrepayUuid() {
        return financePrepayUuid;
    }

    public void setFinancePrepayUuid(String financePrepayUuid) {
        this.financePrepayUuid = financePrepayUuid;
    }

    public DriverCommissionConfigDto getDriverCommissionConfigDto() {
        return driverCommissionConfigDto;
    }

    public void setDriverCommissionConfigDto(DriverCommissionConfigDto driverCommissionConfigDto) {
        this.driverCommissionConfigDto = driverCommissionConfigDto;
    }
}
